package aaaPKg;

public class exDsl {
	
	public static void main(String[] args) {
		
		AStatment as=	statment(()->{
		//	Thread.sleep(2000);
			throw new RuntimeException("aa ex");
		});
		as.ex((Exception e)->{
		 System.out.println(e.getMessage());
		});
		as.fina(()->{
			System.out.println("fina");
		});
	
	
		as.run();
		System.out.println("--f");
		
		 
	}

	private static AStatment statment(  Runnable o){
		AStatment as=new AStatment();
		as.run=o;
//		try {
//			o.run();
//		} catch (Exception e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
		return as;
	}

}
